<?php

use yii\helpers\Url;

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src="/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="/js/ajax141212.js"></script>
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<style>

</style>

<script language="javascript">
    (function(){
      //判断是手机浏览器
      var isMobileBrowser = function(){

        if(/Android|webOS|iPhone|iPod|iPad|BlackBerry|Windows CE|Windows Phone/i.test(navigator.userAgent)){
          if(window.location.href.indexOf("?pc")<0){
            try{
              return true;
            }catch(e){}
          }
        }
        return false;
      }

      if(isMobileBrowser()){
        var mroot = "http://m.recite.eedoc.cn";

        //window.location.href = mroot;
      }
    })();
</script>
</head>
<body>

<div style="width:100%;background-color:#EEE; margin-bottom:10px;">
  <div style=" margin:0px auto; width:1000px; height:30px; line-height:30px;">
      <a href="/">首页</a>
      <a href="<?php echo Url::to(['/question/list'])?>">答题列表</a>
      <a href="<?php echo Url::to(['/question/edit'])?>">答题添加</a>
      <a href="<?php echo Url::to(['/recite/exchange'])?>">知识交换</a>
      <a href="<?php echo Url::to(['/question/list', 'mobile'=>'true'])?>">移动浏览</a>
      <a href="<?php echo Url::to(['/api/list'])?>">API列表</a>
      <a href="<?php echo Url::to(['/note/edit'])?>">笔记添加</a>

      <?php

      if(Yii::$app->user->isGuest){
          echo '<a href="'.Url::to(['/login/login']).'">登录</a>';
      }else{
          echo '<a href="'.Url::to(['/login/logout']).'">登出</a>';
      }
      ?>

  </div>
</div>